using Newtonsoft.Json.Linq;

public class User : I解析<User>
{
    public int level;
    public string name;

    public User 解析(JObject obj)
    {
        if (obj == null) return this;
        
        if (obj.ContainsKey("name"))
        {
            name = obj["name"].ToString();
        }
        
        if (obj.ContainsKey("level"))
        {
            level = obj["level"].Value<int>();
        }

        return this;
    }
}
